package com.ycdx.zwzc.action;

import java.io.InputStream;
import java.util.List;
import java.util.Map;

import org.apache.struts2.interceptor.SessionAware;

import com.opensymphony.xwork2.ActionSupport;
import com.ycdx.zwzc.impl.QueryImpl;
import com.ycdx.zwzc.impl.RequestImpl;
import com.ycdx.zwzc.pojo.Request;

public class ExcelAction extends ActionSupport{
	
	private static final long serialVersionUID = -8109981414099204475L;
	private List<Request> allRequests;
	private String startTime;
	private String endTime;
	private InputStream excelStream;
	
	
	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	public InputStream getExcelStream() {
		 allRequests = QueryImpl.queryByDate(startTime, endTime);;
		 return RequestImpl.getStream(allRequests);	
	}
	
	 public String execute(){
		//System.out.println(1111111);
		return SUCCESS;
	 }
}
